package ntd.util.frame.action.iot;

import com.modular.iot.tool.ToolIotCmd;
import ntd.action.ActionAbs;
import ntd.action.bo.ActionInfo;
import ntd.action.bo.ActionOutBo;
import ntd.protocol.bo.Ntd212BO;
import ntd.util.modular.data.util.handle.tool.Tool212;

public class ActionIotDeviceCmdTest extends ActionAbs {

    @Override
    public ActionInfo info() {
        return new ActionInfo("设备指令执行-test", "iot-device-212-test", new ActionIotDeviceCmdTest());
    }

    
    @Override
    public ActionOutBo handle() {
        // 操作功能编码
        String code = actionInBo.getParamStr("code");
        String cmd = actionInBo.getParamStr("cmd");

        Ntd212BO ntd212BO = Tool212.build212Bo(code, cmd);

        ToolIotCmd.pushCmd(code, ntd212BO.to212Str(), ToolIotCmd.TYPE_212, "测试指令");
//        Tool212.sendMsg(code, ntd212BO.to212Str());

        return new ActionOutBo("true");
    }
}
